package com.webside.advertisement.service.impl;

 


 

import java.util.HashMap;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.webside.advertisement.mapper.AdvertisementMapper;
import com.webside.advertisement.model.AdvertisementEntity;
import com.webside.advertisement.service.AdvertisementService;
import com.webside.banner.mapper.BannerMapper;
import com.webside.base.baseservice.impl.AbstractService;
import com.webside.series.mapper.BdictionaryMapper;
import com.webside.series.mapper.BvideoEntityMapper;
import com.webside.series.mapper.SeriesMapper;
import com.webside.series.model.Bdictionary;
import com.webside.series.model.SeriesEntity;
import com.webside.util.PageUtil;

@Service("AdvertisementService")
public class AdvertisementServiceImpl  extends AbstractService<AdvertisementEntity, Long> implements AdvertisementService{


	@Autowired
	private BdictionaryMapper bdictionaryMapper;
	@Autowired
	private SeriesMapper seriesMapper;
	@Autowired
	private AdvertisementMapper advertisementMapper;
	@Override
	public List<Bdictionary> querytype(Bdictionary bdictionary) {
		// TODO Auto-generated method stub
		return bdictionaryMapper.queryAdType(bdictionary);
	}

	@Autowired
	public void setBaseMapper() {
		super.setBaseMapper(advertisementMapper);
	}

	@Override
	public int queryAllSeries() {
		// TODO Auto-generated method stub
		return seriesMapper.queryAllSeries();
	}

	@Override
	public List<SeriesEntity> querySeries(PageUtil pageUtil, String sort) {
		// TODO Auto-generated method stub
		return seriesMapper.querySeries(pageUtil,sort);
	}
	
	@Override
	public int updatestatus(AdvertisementEntity advertisementEntity) {
		// TODO Auto-generated method stub
		return advertisementMapper.updatestatus(advertisementEntity);
	}

	@Override
	public int querycount(String sort) {
		// TODO Auto-generated method stub
		return advertisementMapper.querycount(sort);
	}

	@Override
	public List<HashMap<String,Object>> queryAd(PageUtil pageUtil, String sort ,String code) {
		// TODO Auto-generated method stub
		return advertisementMapper.queryAd(pageUtil,sort,code);
	}

}
